SetMediaTimeScale
TheSetMediaTimeScale
function allows your application to set a media's time scale.
pascal void SetMediaTimeScale (Media theMedia, TimeScale timeScale);
theMedia
- Specifies the media for this operation. Your application obtains this media identifier from such Movie Toolbox functions as
NewTrackMedia
andGetTrackMedia
(described on page 2-138 and page 2-190, respectively).timeScale
- Specifies the media's new time scale.
DESCRIPTION
In response to this request, the Movie Toolbox attempts to adjust the edit list of the appropriate track so that movie playback is unaffected. If you change a media's time scale by setting it to a smaller value, you may lose precision in media time values. In general, you should only increase the time scale value, and you should try to use integer multiples of the existing time scale.SPECIAL CONSIDERATIONS
Do not useSetMediaTimeScale
as a general rule. If you call this function with a number that is not an integer multiple, the duration of the samples vary unpredictably, and their start times tend to drift.ERROR CODES
invalidMedia -2008 This media is corrupted or invalid